# forecast-actual.R
# Plotting cap-and-trade forecasts and actual prices
# Endre Tvinnereim, 2013-14
forecasts <- read.csv("forecasts.csv", sep=";")
forecast <- forecasts$Forecast
actual <- forecasts$Actual

setEPS()
postscript("fig3.eps")
plot(forecast,actual, log="xy", ylim=c(1,1000), xlim=c(1,1000))
# add 45 deg line
# logarithmic scale
lines(c(.1,1000),c(.1,1000))
text(forecast,actual*.8,forecasts$program)

for (i in 1:length(forecast)) {
   abline(h=actual[i],col=3,lty=3)
#  abline(v=forecast[i],col=4,lty=3)
   }

abline(v=,col=3,lty=3)
dev.off()

save.image(file="fig3.Rdata")

